package org.rency.common.mq.handler.impl;

import org.rency.common.mq.enums.DestinationType;
import org.rency.common.mq.request.MQRequest;

public abstract class AbstractMessageHandler extends AbstractHandler {

	private String destination;
	private DestinationType destinationType = DestinationType.QUEUE;

	@Override
	public MQRequest convertToMQRequest(Object request) {
		if (MQRequest.class.isAssignableFrom(request.getClass())) {
            return (MQRequest) request;
        }

        return null;
	}

	public String getDestination() {
		return destination;
	}

	public void setDestination(String destination) {
		this.destination = destination;
	}

	public DestinationType getDestinationType() {
		return destinationType;
	}

	public void setDestinationType(DestinationType destinationType) {
		this.destinationType = destinationType;
	}

}
